<html>
<body>
Reports type casts that can be removed if the variable type is narrowed to the cast type.
<p>Example:</p>
<pre><code>
  Object x = "  string  ";
  System.out.println(((String)x).trim());
</code></pre>
<p>
Here, changing the type of <code>x</code> to <code>String</code> makes the cast redundant. The suggested quick-fix updates the variable type and
removes all redundant casts on that variable:
</p>
<pre><code>
  String x = "  string  ";
  System.out.println(x.trim());
</code></pre>
<!-- tooltip end -->
<p><small>New in 2018.2</small></p>
</body>
</html>
